
const data_config = require("./data_config");


module.exports = {
  nav_name: '京东商品管理', //生成导航菜单
  module_name: 'jd_m',  //生成路径，必须与文件名相同
  api: `{
    page: commonPath + "/admin/jdGood/page", //分页
    del: cPath + "/admin/jdGood/remove", //删除
    pxSync: commonPath + "/admin/jdGood/pxSync", //普消同步
    ywSync: commonPath + "/admin/jdGood/ywSync", //易物同步

    jd_import: cPath + "/jd/good/getGood", //京东商品条件导入
  }`, //接口
  
  //列表
  table: {
    isGenerate: "false", //false表示不生成页面
    table_name: "jd_m_table",  //表页面名
    nav_name: "京东商品列表",  //导航名
    tipsText: "京东商品管理 >> 京东商品列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    // pageApi: "API.sys_setting.sys_setting_page",  //请求api
    // extraPageRequestParams: `
    //   courseId: this.$route.query.id,  //请求
    // `, //已有page和pageSize
    //获取列表页面
    tableData: [
      //普通
      { title: '序号', name: 'index', type: "normal" },
      { title: '商品名', name: 'name', type: "normal", itemWidth: "200" },
      // {
      //   title: '类型',
      //   name: 'type',
      //   type: "opts",
      //   showName: "typeShow",
      //   showObj: `{
      //      "1": "普消",
      //      "2": "易物",
      //    }`
      // },
      { title: '一级分类编码', name: 'catCode', type: "normal" },
      { title: '二级分类编码', name: 'superCode', type: "normal" },
      { title: '三级分类编码', name: 'classCode', type: "normal" },
      { title: '品牌', name: 'brandName', type: "normal" },
      // { title: '成本价', name: 'floorPrice', type: "normal" },
      { title: '京东价格', name: 'price', type: "normal" },
      {
        title: '商品主图',
        name: 'imagePath',
        type: "img",
        heightVal: "60",
        widthVal: "100",
      },
      { title: '库存', name: 'inventory', type: "normal" },
      // {
      //   title: '状态',
      //   name: 'state',
      //   type: "opts",
      //   showName: "stateShow",
      //   showObj: `{
      //      "1": "上架",
      //      "2": "下架",
      //    }`
      // },
    ],
    tableOpt: [
      
    ],
    search: {
      contentArr: {
        input1: { labelName: '商品名称', inputName: 'name' },
      
        select2_1: {
          labelName: '一级分类',
          inputName: 'catCode',  //输入绑定的变量
          selectOptsName: "catCodeOpts",
          selectOptsArr: `[
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
        select2_2: {
          // labelWidth: "120",
          labelName: '二级分类',
          inputName: 'superCode',  //输入绑定的变量
          selectOptsName: "superCodeOpts",
          selectOptsArr: `[
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
        select2_3: {
          labelName: '三级分类',
          inputName: 'classCode',  //输入绑定的变量
          selectOptsName: "classCodeOpts",
          selectOptsArr: `[
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "新增等级",
      //   request: false,
      //   jump: "/member_manager_add_page", //添加的跳转按钮
      // }
    },
  },


   //京东商品导入列表
   table2: {
    isGenerate: "false", //false表示不生成页面
    table_name: "jd_m_table_import",  //表页面名
    nav_name: "京东商品导入",  //导航名
    tipsText: "京东商品管理 >> 京东商品导入", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    // pageApi: "API.sys_setting.sys_setting_page",  //请求api
    // extraPageRequestParams: `
    //   courseId: this.$route.query.id,  //请求
    // `, //已有page和pageSize
    //获取列表页面
    tableData: [
      //普通
      { title: '序号', name: 'index', type: "normal" },
      { title: '商品名关键字', name: 'keyword', type: "normal", itemWidth: "200" },
      { title: '一级分类编码', name: 'catCode', type: "normal" },
      { title: '二级分类编码', name: 'superCode', type: "normal" },
      { title: '三级分类编码', name: 'classCode', type: "normal" },
      { title: '品牌', name: 'brandName', type: "normal" },
      // { title: '成本价', name: 'floorPrice', type: "normal" },
      { title: '京东价格', name: 'price', type: "normal" },
      {
        title: '商品主图',
        name: 'imagePath',
        type: "img",
        heightVal: "60",
        widthVal: "100",
      },
      { title: '库存', name: 'inventory', type: "normal" },
      // {
      //   title: '状态',
      //   name: 'state',
      //   type: "opts",
      //   showName: "stateShow",
      //   showObj: `{
      //      "1": "上架",
      //      "2": "下架",
      //    }`
      // },
    ],
    tableOpt: [
      
    ],
    search: {
      contentArr: {
        input1: { labelName: '商品名称关键字', inputName: 'keyword' },
        input2: { labelName: '最低价', inputName: 'min' },
        input3: { labelName: '最高价', inputName: 'max' },
        input5: { labelName: '第几页', inputName: 'pageIndex' },
        input6: { labelName: '每页条数', inputName: 'pageSize' },
      
        select2_1: {
          labelName: '一级分类',
          inputName: 'catCode',  //输入绑定的变量
          selectOptsName: "catCodeOpts",
          selectOptsArr: `[
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
        select2_2: {
          // labelWidth: "120",
          labelName: '二级分类',
          inputName: 'superCode',  //输入绑定的变量
          selectOptsName: "superCodeOpts",
          selectOptsArr: `[
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
        select2_3: {
          labelName: '三级分类',
          inputName: 'classCode',  //输入绑定的变量
          selectOptsName: "classCodeOpts",
          selectOptsArr: `[
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
        select2_4: {
          labelName: '排序规则',
          inputName: 'sortField',  //输入绑定的变量
          selectOptsName: "sortFieldOpts",
          selectOptsArr: `[
            { value: "price", label: "幸福树价格（成本价）" },
            { value: "jdPrice", label: "京东价格" },
            { value: "diffPrice", label: "价格差" },
            { value: "diffPriceRatio", label: "价格差比例" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "新增等级",
      //   request: false,
      //   jump: "/member_manager_add_page", //添加的跳转按钮
      // }
    },
  },


}

